//
//  RunDateMostCell.m
//  DefendHealth
//
//  Created by UNOHACHA on 17/2/22.
//  Copyright © 2017年 iMacOne. All rights reserved.
//

#import "RunDateMostCell.h"

@implementation RunDateMostCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        self.contentView.backgroundColor = kWhiteColor;

        UILabel * distanceL = [ReduceCode creatLabelWithFrame:CGRectMake(0,24, kScreenWidth, 30) title:@"5.20" titleColor:UIColorFromRGB(0x333333) font:30 textAlignment:NSTextAlignmentCenter];
        [self.contentView addSubview:distanceL];
        
        UILabel * disStr = [ReduceCode creatLabelWithFrame:CGRectMake(0,kMaxY(distanceL.frame)+12, kScreenWidth, 11) title:@"累计距离/公里" titleColor:UIColorFromRGB(0x666666) font:11 textAlignment:NSTextAlignmentCenter];
        [self.contentView addSubview:disStr];
        
        
        [ToolUtil createLine:kMaxY(disStr.frame)+12 superView:self.contentView lift:0 width:kScreenWidth hight:0.5 color:kLineColor];
        
        UILabel * calorieL = [ReduceCode creatLabelWithFrame:CGRectMake(0, kMaxY(disStr.frame)+30, kScreenWidth/3, 20) title:@"3250" titleColor:UIColorFromRGB(0x333333) font:14 textAlignment:NSTextAlignmentCenter];
        [self.contentView addSubview:calorieL];
        
        
        UILabel * runTimerL = [ReduceCode creatLabelWithFrame:CGRectMake(kScreenWidth/3, calorieL.y, kScreenWidth/3, 20) title:@"00:30:00" titleColor:UIColorFromRGB(0x333333) font:14 textAlignment:NSTextAlignmentCenter];
        [self.contentView addSubview:runTimerL];
        UILabel * runNumL = [ReduceCode creatLabelWithFrame:CGRectMake(kScreenWidth/3*2, calorieL.y, kScreenWidth/3, 20) title:@"5" titleColor:UIColorFromRGB(0x333333) font:14 textAlignment:NSTextAlignmentCenter];
        [self.contentView addSubview:runNumL];
        
        
        
        
        NSArray * text = @[@"消耗(大卡)",@"累计时间/分钟",@"运动次数"];
        for (int U = 0; U<3; U++) {    //(B+1)*weight+B*27
            UILabel * dateStr = [ReduceCode creatLabelWithFrame:CGRectMake(kScreenWidth/3*U, kMaxY(runNumL.frame), kScreenWidth/3, 12) title:text[U] titleColor:UIColorFromRGB(0x666666) font:11 textAlignment:NSTextAlignmentCenter];
            [self.contentView addSubview:dateStr];
        }
        
    }
    
    return self;
}





@end
